home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_VSQD2.ZIP / Virtua Squad 2.txt < prev    next >
Text File  |  1998-04-23  |  12KB  |  232 lines

  1.  
  2. Free Information Xchange '98 presents:
  3.  
  4. Virtua Squad 2 - CD check crack by Static Vengeance
  5.  
  6. Requirements:
  7. hex editor and full install
  8.  
  9.     Okay, time for another quick tutorial in CD check cracking.  Like all my the other tutorials
  10. on CD checks you will need to use W32Dasm to follow along.  Alright, first thing you need to do is to
  11. disassemble the exe file ppj2dd.exe.  Now when you run the game without the CD a dialog box comes up
  12. and says you can cancel or play as a guest on the proving grounds.  Well I thought that would be easy
  13. enough to find from the Refs/String data references in W32Dasm (IE: go up to the menu bar and select
  14. "Refs" and then select "String data references" from the drop down menu).  However there is no direct
  15. reference to that string.  But there was something even better when you scrolled down and checked out
  16. what strings are referenced.  How about "VCOP2\PROJECT\PPJ2DD.EXE", that's a direct reference to the
  17. exe file on the CD with the CD volume and all.  Well you should know by now that that has to be apart
  18. of the CD checking routine, right?  So double clicking on that string will put you right in the middle
  19. of the routine that checks for the CD and it goes something like this:
  20.  
  21. * Referenced by a CALL at Address:
  22. |:0040E4B7   
  23. |
  24. :0040E420 83EC50                  sub esp, 00000050
  25. :0040E423 53                      push ebx
  26. :0040E424 56                      push esi
  27. :0040E425 57                      push edi
  28. :0040E426 33DB                    xor ebx, ebx          <-- Zero out number of runs through the CD check
  29. :0040E428 55                      push ebp
  30.  
  31. * Reference To: KERNEL32.GetLogicalDrives, Ord:00FAh          <-- This is one tip off
  32.                                   |
  33. :0040E429 FF1510738000            Call dword ptr [00807310]
  34. :0040E42F 8BE8                    mov ebp, eax
  35.  
  36. * Reference To: KERNEL32.lstrcatA, Ord:0292h
  37.                                   |
  38. :0040E431 8B350C738000            mov esi, dword ptr [0080730C]
  39.  
  40. * Reference To: USER32.wsprintfA, Ord:026Dh
  41.                                   |
  42. :0040E437 8B3D58748000            mov edi, dword ptr [00807458]
  43.  
  44. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  45. |:0040E48F(C)
  46. |
  47. :0040E43D B801000000              mov eax, 00000001
  48. :0040E442 8ACB                    mov cl, bl
  49. :0040E444 D3E0                    shl eax, cl
  50. :0040E446 85C5                    test ebp, eax
  51. :0040E448 7441                    je 0040E48B
  52. :0040E44A 8D4341                  lea eax, dword ptr [ebx+41]
  53. :0040E44D 8D4C2410                lea ecx, dword ptr [esp+10]
  54. :0040E451 50                      push eax
  55.  
  56. * Possible StringData Ref from Data Obj ->"%c:\"                <-- Commonly used ref in CD checks
  57.                                   |
  58. :0040E452 687C974500              push 0045977C
  59. :0040E457 51                      push ecx
  60. :0040E458 FFD7                    call edi
  61. :0040E45A 8D4C241C                lea ecx, dword ptr [esp+1C]
  62. :0040E45E 83C40C                  add esp, 0000000C
  63. :0040E461 51                      push ecx
  64.  
  65. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh              <-- Commonly used "text string" to search for
  66.                                   |
  67. :0040E462 FF1508738000            Call dword ptr [00807308]
  68. :0040E468 83F805                  cmp eax, 00000005            <-- 05 is the value for a CD-ROM drive
  69. :0040E46B 751E                    jne 0040E48B
  70. :0040E46D 8D442410                lea eax, dword ptr [esp+10]
  71.  
  72. * Possible StringData Ref from Data Obj ->"VCOP2\PROJECT\PPJ2DD.EXE"   <-- Check for this file on CD
  73.                                   |
  74. :0040E471 6860974500              push 00459760
  75. :0040E476 50                      push eax
  76. :0040E477 FFD6                    call esi
  77. :0040E479 8D442410                lea eax, dword ptr [esp+10]
  78. :0040E47D 6A00                    push 00000000
  79. :0040E47F 50                      push eax
  80.  
  81. * Reference To: KERNEL32._lopen, Ord:028Eh
  82.                                   |
  83. :0040E480 FF1504738000            Call dword ptr [00807304]
  84. :0040E486 83F8FF                  cmp eax, FFFFFFFF
  85. :0040E489 7508                    jne 0040E493
  86.  
  87. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  88. |:0040E448(C), :0040E46B(C)
  89. |
  90. :0040E48B 43                      inc ebx                     <-- Made another check, add 1 to ebx
  91. :0040E48C 83FB20                  cmp ebx, 00000020           <-- Try up to 20h (32) times
  92. :0040E48F 7CAC                    jl 0040E43D                 <-- Keep trying to fid the CD until you hit 32
  93. :0040E491 EB07                    jmp 0040E49A                <-- Tried 32 times and STILL didn't find it
  94.  
  95. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  96. |:0040E489(C)
  97. |
  98. :0040E493 50                      push eax
  99.  
  100. * Reference To: KERNEL32._lclose, Ord:028Bh
  101.                                   |
  102. :0040E494 FF1500738000            Call dword ptr [00807300]
  103.  
  104. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  105. |:0040E491(U)
  106. |
  107. :0040E49A B8FFFFFFFF              mov eax, FFFFFFFF         <-- Set up for a failed CD check
  108. :0040E49F 83FB20                  cmp ebx, 00000020         <-- Did we fail to find the file 32 times?
  109. :0040E4A2 7402                    je 0040E4A6               <-- The all important instruction
  110. :0040E4A4 8BC3                    mov eax, ebx              <-- Anything else is passed CD check
  111.  
  112. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  113. |:0040E4A2(C)
  114. |
  115. :0040E4A6 5D                      pop ebp
  116. :0040E4A7 5F                      pop edi
  117. :0040E4A8 5E                      pop esi
  118. :0040E4A9 5B                      pop ebx
  119. :0040E4AA 83C450                  add esp, 00000050
  120. :0040E4AD C3                      ret
  121.  
  122.     That's the section of code that checks for the program file on the CD.  If the CD check failed
  123. eax is loaded with FFFFFFFF, otherwise anything else means the CD is in your CD-ROM drive...  If you
  124. don't have a CD in the drive, the ONLY choice you have is to play over the modem/net or exit to Win95.
  125. So lets check out the code the calls the above routine and see what it does:
  126.  
  127. * Referenced by a CALL at Address:
  128. |:0040D61A   
  129. |
  130. :0040E4B0 56                      push esi
  131.  
  132. * Reference To: USER32.DialogBoxParamA, Ord:008Eh
  133.                                   |
  134. :0040E4B1 8B3530748000            mov esi, dword ptr [00807430]
  135. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  136. |:0040E4FB(C)
  137. |
  138. :0040E4B7 E864FFFFFF              call 0040E420                   <-- Check for original CD
  139. :0040E4BC 8B15C0B85200            mov edx, dword ptr [0052B8C0]
  140. :0040E4C2 8B0D7CB85200            mov ecx, dword ptr [0052B87C]
  141. :0040E4C8 A3D8B85200              mov dword ptr [0052B8D8], eax   <-- Store the returned value
  142. :0040E4CD 83F8FF                  cmp eax, FFFFFFFF               <-- Was it present?
  143. :0040E4D0 A1DCB85200              mov eax, dword ptr [0052B8DC]
  144. :0040E4D5 752D                    jne 0040E504                    <-- This jump taked for passed CD check
  145. :0040E4D7 6A00                    push 00000000
  146. :0040E4D9 8B0485B8954500          mov eax, dword ptr [4*eax+004595B8]
  147. :0040E4E0 6820E54000              push 0040E520
  148. :0040E4E5 51                      push ecx
  149. :0040E4E6 50                      push eax
  150. :0040E4E7 52                      push edx
  151. :0040E4E8 FFD6                    call esi
  152. :0040E4EA 8B0D48964500            mov ecx, dword ptr [00459648]
  153. :0040E4F0 85C0                    test eax, eax
  154. :0040E4F2 7405                    je 0040E4F9
  155. :0040E4F4 83F902                  cmp ecx, 00000002    <-- Hit cancel, so set up to quit to Win95
  156. :0040E4F7 7412                    je 0040E50B
  157.  
  158. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  159. |:0040E4F2(C)
  160. |
  161. :0040E4F9 85C0                    test eax, eax
  162. :0040E4FB 75BA                    jne 0040E4B7          <-- Loop up and retry to read for the CD
  163. :0040E4FD B8FFFFFFFF              mov eax, FFFFFFFF     <-- Play as the guest in the multiplayer
  164. :0040E502 5E                      pop esi               <-- mode of the "Proving Gounds"
  165. :0040E503 C3                      ret
  166.  
  167. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  168. |:0040E4D5(C)
  169. |
  170. :0040E504 B801000000              mov eax, 00000001    <-- Everything is good, let the user PLAY!
  171. :0040E509 5E                      pop esi
  172. :0040E50A C3                      ret
  173.  
  174. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  175. |:0040E4F7(C)
  176. |
  177. :0040E50B 33C0                    xor eax, eax         <-- Set up for exit to Win95
  178. :0040E50D 5E                      pop esi
  179. :0040E50E C705D8B8520000000000    mov dword ptr [0052B8D8], 00000000
  180. :0040E518 C3                      ret
  181.  
  182.     Okay, there are four possible choices from the CD checking rountine.  First choice is
  183. the CD is there and everything is just fine: eax is loaded with 00000001.  However the other
  184. three choices come into play if no CD is found.  You either retry to read the CD in which case
  185. the code simply loops back up and tries again.  You can choose to play as a guest in the multi-
  186. player mode on the proving grounds: eax is loaded with FFFFFFFF, or you hit cancel and you're
  187. booted back to Win95: eax is zeroed out.  So once agian we trace the program further back and
  188. take a look at the calling code to see what it does:
  189.  
  190.   -- Program Code --
  191. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  192. |:0040D5E5(C)
  193. |
  194. :0040D60B E8C0110000              call 0040E7D0
  195. :0040D610 E82BFD0100              call 0042D340
  196. :0040D615 A344964500              mov dword ptr [00459644], eax
  197. :0040D61A E8910E0000              call 0040E4B0                     <-- Do CD check
  198. :0040D61F A340964500              mov dword ptr [00459640], eax     <-- Store returned value here
  199. :0040D624 83F8FF                  cmp eax, FFFFFFFF                 <-- What happenned with CD check?
  200. :0040D627 0F840D030000            je 0040D93A                       <-- No CD, but play as guest
  201. :0040D62D 8BBC24B0000000          mov edi, dword ptr [esp+000000B0] <-- Continue with program
  202. :0040D634 8D442410                lea eax, dword ptr [esp+10]
  203. :0040D638 33DB                    xor ebx, ebx
  204. :0040D63A 893DC0B85200            mov dword ptr [0052B8C0], edi
  205. :0040D640 897C2428                mov dword ptr [esp+28], edi
  206. :0040D644 6A7B                    push 0000007B
  207. :0040D646 57                      push edi
  208.  
  209. * Reference To: USER32.LoadIconA, Ord:017Ch
  210.                                   |
  211. :0040D647 8B2D00748000            mov ebp, dword ptr [00807400]
  212.   -- More Program Code --
  213.  
  214.     This is the section of code we want to deal with right here.  This is the only call
  215. to the CD check routine (from 40D61A) and then the program code decides what to do with the
  216. value that was returned from the CD check.  What I thought would be a good crack for this
  217. game was to change the Call 0040E4B0 to mov eax,00000001.  That way the CD check is never
  218. made and the 00000001 in eax simulates a successful CD check.  I made the patch to the
  219. program file and tested it.  All functions work and it never cares if you have the CD in
  220. the CD-ROM drive or not.  Make the edit to the file ppj2dd.exe and you have cracked this
  221. one.  The only other thing I did was rename the file to VirtuaCop.exe and changed the Win95
  222. shortcut to match.
  223.  
  224. Edit ppj2dd.exe at offset 51,738
  225. ================================
  226. Search for: E8 91 0E 00 00
  227. chagne to : B8 01 00 00 00
  228.  
  229. That's all it takes to FiX Virtua Squad 2
  230.  
  231. Static Vengeance
  232.